package com.sh.data.engine.application.model.request.datadev;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author: mengzheng.mhc
 * @date: 2024/7/10 16:14
 */
@Data
@Schema
public class OfflineDevTaskFlowVNodeConfigSaveRequest {

    @NotNull(message = "开始节点id不能为空")
    @Schema(description = "开始节点id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long nodeId;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd hh:mm:ss")
    private Date effectiveDateStart;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd hh:mm:ss")
    private Date effectiveDateEnd;

    @Schema(description = "工作流Id")
    private Long taskFlowId;

    private Integer cycle;

    private Integer startTimeHour;

    private Integer startTimeMin;

    private Integer endTimeHour;

    private Integer endTimeMin;

    private String execPoint;

    @NotNull(message = "周期依赖不能为空")
    @Schema(
        description = "周期依赖,0-不依赖上一调度周期 1-等待上一周期结束再运行",
        requiredMode = Schema.RequiredMode.REQUIRED,
        allowableValues = {"0", "1"})
    private Integer cycleDependency;
}
